package com.smh.a02BigIntegerDemo2;

import java.math.BigInteger;

public class Test2 {
    public static void main(String[] args) {

        BigInteger bigInteger = BigInteger.valueOf(10);
        BigInteger bigInteger1 = BigInteger.valueOf(5);
        //BigInteger bigInteger2 = BigInteger.valueOf(19);
        //加
        System.out.println(bigInteger.add(bigInteger1));
        //减
        System.out.println(bigInteger.subtract(bigInteger1));
//        乘
        System.out.println(bigInteger.multiply(bigInteger1));
        //除(商和余数)
        System.out.println(bigInteger.divide(bigInteger1));
        System.out.println(bigInteger.divideAndRemainder(bigInteger1)[1]);
        //比较
        System.out.println(bigInteger.equals(bigInteger1));
        //幂
        System.out.println(bigInteger.pow(bigInteger1.intValue()));
        //较大值
        System.out.println(bigInteger.max(bigInteger1));
        //转化为long
        System.out.println(bigInteger.longValue());

        BigInteger bd = new BigInteger("100000000000000000000000000000000000000");
        System.out.println(bd);


    }
}
